CustomAndroidAPI 1.44
Loading...
Searching...
No Matches
it.custom.printer.api.android.PrinterFont Class Reference

Public Member Functions

int getCharWidth ()
 
void setCharWidth (int charWidth) throws CustomException
 
int getCharHeight ()
 
void setCharHeight (int charHeight) throws CustomException
 
boolean getEmphasized ()
 
void setEmphasized (boolean bValue)
 
boolean getItalic ()
 
void setItalic (boolean bValue)
 
boolean getUnderline ()
 
void setUnderline (boolean bValue) throws CustomException
 
int getJustification ()
 
void setJustification (int justification) throws CustomException
 
void setCharFontType (int charFontType) throws CustomException
 
int getCharFontType ()
 
int getLineSpacing ()
 
void setLineSpacing (int iValue) throws CustomException
 
void setInternationalCharSet (int _interCharSet) throws CustomException
 
int getInternationalCharSet ()
 

Static Public Attributes

static final int FONT_SIZE_X1 = 0
 
static final int FONT_SIZE_X2 = 1
 
static final int FONT_SIZE_X3 = 2
 
static final int FONT_SIZE_X4 = 3
 
static final int FONT_SIZE_X5 = 4
 
static final int FONT_SIZE_X6 = 5
 
static final int FONT_SIZE_X7 = 6
 
static final int FONT_SIZE_X8 = 7
 
static final int FONT_JUSTIFICATION_LEFT = 0
 
static final int FONT_JUSTIFICATION_CENTER = 1
 
static final int FONT_JUSTIFICATION_RIGHT = 2
 
static final int FONT_TYPE_A = 0
 
static final int FONT_TYPE_B = 1
 
static final int FONT_TYPE_1 = 5
 
static final int FONT_TYPE_2 = 6
 
static final int FONT_TYPE_3 = 7
 
static final int FONT_TYPE_4 = 8
 
static final int FONT_TYPE_5 = 9
 
static final int LINESPACING_DEFAULT = 64
 
static final int FONT_CS_DEFAULT = 0
 

Detailed Description

This the container class to hold various font attributes

Member Function Documentation

◆ getCharFontType()

int it.custom.printer.api.android.PrinterFont.getCharFontType ( )
inline

Returns the font char type

Returns
  • FONT_TYPE_1 - Font Type 1.
  • FONT_TYPE_2 - Font Type 2.
  • FONT_TYPE_3 - Font Type 3.
  • FONT_TYPE_4 - Font Type 4.
  • FONT_TYPE_5 - Font Type 5.
  • FONT_TYPE_A - Font A.
  • FONT_TYPE_B - Font B.

◆ getCharHeight()

int it.custom.printer.api.android.PrinterFont.getCharHeight ( )
inline

Returns charHeight (FONT_SIZE_X1-FONT_SIZE_X8)

◆ getCharWidth()

int it.custom.printer.api.android.PrinterFont.getCharWidth ( )
inline

Returns charWidth (FONT_SIZE_X1-FONT_SIZE_X8)

◆ getEmphasized()

boolean it.custom.printer.api.android.PrinterFont.getEmphasized ( )
inline

Returns emphasized flag

Returns
true is emphasized else false

◆ getInternationalCharSet()

int it.custom.printer.api.android.PrinterFont.getInternationalCharSet ( )
inline

Returns the international char set

Returns
the international char set

◆ getItalic()

boolean it.custom.printer.api.android.PrinterFont.getItalic ( )
inline

Returns italic flag

Returns
true if italic else false

◆ getJustification()

int it.custom.printer.api.android.PrinterFont.getJustification ( )
inline

Return justification attribute

Returns
  • FONT_JUSTIFICATION_LEFT - left.
  • FONT_JUSTIFICATION_CENTER - center.
  • FONT_JUSTIFICATION_RIGHT - right.

◆ getLineSpacing()

int it.custom.printer.api.android.PrinterFont.getLineSpacing ( )
inline

Returns current line spacing

◆ getUnderline()

boolean it.custom.printer.api.android.PrinterFont.getUnderline ( )
inline

Returns the underline type

Returns
true if underline else false

◆ setCharFontType()

void it.custom.printer.api.android.PrinterFont.setCharFontType ( int  charFontType) throws CustomException
inline

Sets the char font type

Parameters
charFontType
  • FONT_TYPE_1 - Font Type 1.
  • FONT_TYPE_2 - Font Type 2.
  • FONT_TYPE_3 - Font Type 3.
  • FONT_TYPE_4 - Font Type 4.
  • FONT_TYPE_5 - Font Type 5.
  • FONT_TYPE_A - Font A.
  • FONT_TYPE_B - Font B.
Exceptions
CustomException

◆ setCharHeight()

void it.custom.printer.api.android.PrinterFont.setCharHeight ( int  charHeight) throws CustomException
inline

Sets the character height ratio. Min is FONT_SIZE_X1 and Max is FONT_SIZE_X8

Parameters
charHeightheight ratio

◆ setCharWidth()

void it.custom.printer.api.android.PrinterFont.setCharWidth ( int  charWidth) throws CustomException
inline

Sets the character width ratio. Min is FONT_SIZE_X1 and Max is FONT_SIZE_X8

Parameters
charWidthwidth ratio

◆ setEmphasized()

void it.custom.printer.api.android.PrinterFont.setEmphasized ( boolean  bValue)
inline

Set the emphasied flag. Default is false.

Parameters
bValuetrue to bold/emphasize the text

◆ setInternationalCharSet()

void it.custom.printer.api.android.PrinterFont.setInternationalCharSet ( int  _interCharSet) throws CustomException
inline

Sets the international char set

Parameters
_interCharSetis the codepage value. Ex: 437 for "PC437 - USA"
  • 0 - Default.
Exceptions
CustomException

◆ setItalic()

void it.custom.printer.api.android.PrinterFont.setItalic ( boolean  bValue)
inline

Sets the italic flag. Default is false.

Parameters
bValuetrue to make the text italic else false

◆ setJustification()

void it.custom.printer.api.android.PrinterFont.setJustification ( int  justification) throws CustomException
inline

Sets the justification attribute

Parameters
justification
  • FONT_JUSTIFICATION_LEFT - left.
  • FONT_JUSTIFICATION_CENTER - center.
  • FONT_JUSTIFICATION_RIGHT - right.
Exceptions
CustomException

◆ setLineSpacing()

void it.custom.printer.api.android.PrinterFont.setLineSpacing ( int  iValue) throws CustomException
inline

Set the line spacing. Please refere to the device command manual for additional info. NOTE: All the values under the font height set line spacing to 0.

Parameters
iValueline spacing
Exceptions
CustomException

◆ setUnderline()

void it.custom.printer.api.android.PrinterFont.setUnderline ( boolean  bValue) throws CustomException
inline

Sets the underline attribute. Default is false

Parameters
bValuetrue to make the text underline else false
Exceptions
CustomException

Member Data Documentation

◆ FONT_CS_DEFAULT

final int it.custom.printer.api.android.PrinterFont.FONT_CS_DEFAULT = 0
static

Indicates that the International Charset is Default

◆ FONT_JUSTIFICATION_CENTER

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_CENTER = 1
static

Indicates that the Font Justification is Center

◆ FONT_JUSTIFICATION_LEFT

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_LEFT = 0
static

Indicates that the Font Justification is Left

◆ FONT_JUSTIFICATION_RIGHT

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_RIGHT = 2
static

Indicates that the Font Justification is Right

◆ FONT_SIZE_X1

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X1 = 0
static

Indicates that the Font Size is 1X

◆ FONT_SIZE_X2

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X2 = 1
static

Indicates that the Font Size is 2X

◆ FONT_SIZE_X3

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X3 = 2
static

Indicates that the Font Size is 3X

◆ FONT_SIZE_X4

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X4 = 3
static

Indicates that the Font Size is 4X

◆ FONT_SIZE_X5

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X5 = 4
static

Indicates that the Font Size is 5X

◆ FONT_SIZE_X6

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X6 = 5
static

Indicates that the Font Size is 6X

◆ FONT_SIZE_X7

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X7 = 6
static

Indicates that the Font Size is 7X

◆ FONT_SIZE_X8

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X8 = 7
static

Indicates that the Font Size is 8X

◆ FONT_TYPE_1

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_1 = 5
static

Indicates that the Font 1

◆ FONT_TYPE_2

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_2 = 6
static

Indicates that the Font 2

◆ FONT_TYPE_3

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_3 = 7
static

Indicates that the Font 3

◆ FONT_TYPE_4

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_4 = 8
static

Indicates that the Font 4

◆ FONT_TYPE_5

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_5 = 9
static

Indicates that the Font 5

◆ FONT_TYPE_A

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_A = 0
static

Indicates that the Font Type is A

◆ FONT_TYPE_B

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_B = 1
static

Indicates that the Font Type is B

◆ LINESPACING_DEFAULT

final int it.custom.printer.api.android.PrinterFont.LINESPACING_DEFAULT = 64
static

Indicates the default line spacing